package com.flx.dis.nacos.api.user.service;

import com.flx.common.utils.result.ResultResponse;
import com.flx.dis.nacos.api.user.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "common-nacos-user",path = "/user")
public interface IUserService {

    @GetMapping("/get/{id}")
    ResultResponse<UserDto> get(@PathVariable("id")Long id);

    @PostMapping("/add")
    ResultResponse<Integer> add(@RequestBody UserDto user);

    @PostMapping("/update")
    ResultResponse<Integer> update(@RequestBody UserDto user);

    @GetMapping("/delete/{id}")
    ResultResponse<Integer> delete(@PathVariable("id")Long id);

}
